<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:s="http://jboss.com/products/seam/taglib"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:rich="http://richfaces.org/rich"
    xmlns:a="http://richfaces.org/a4j"
    template="/layout/admin_template.xhtml">

    <ui:define name="body">
    	<h:form>
    		<rich:dataTable id="ut_id" value="#{kUserListManager.userList}" var="e" rows="25" styleClass="b">
    			<rich:column width="10%" styleClass="tac">
    				<f:facet name="header">
    					<h:outputText value="#{messages.img_msg}" />
    				</f:facet>
    				<h:commandLink action="#{kUserListManager.edit(e.id)}" title="#{messages.edit_msg}" immediate="true" >
						<img id="thumb_" src="/#{kInitParam.imgPath}/av_#{e.img.userId}/#{e.img.thumb}" width="50" height="50"/>
    				</h:commandLink>
    			</rich:column>
    			<rich:column width="5%" styleClass="tac" >
    				<f:facet name="header">
    					<h:outputText value="#{messages.id_msg}" />
    				</f:facet>
    				<h:commandLink action="#{kUserListManager.edit(e.id)}" value="#{e.id}" title="#{messages.edit_msg}" immediate="true" />
    			</rich:column>
    			<rich:column>
    				<f:facet name="header">
    					<h:outputText value="#{messages.k_name_msg}" />
    				</f:facet>
    				<h:commandLink action="#{kUserListManager.edit(e.id)}" value="#{e.user.username}" title="#{messages.edit_msg}" immediate="true" />
    			</rich:column>
    			<rich:column>
    				<f:facet name="header">
    					<h:outputText value="#{messages.type_msg}" />
    				</f:facet>
    				<h:outputText value="#{e.user.userType.message}" />
    			</rich:column>
    			<rich:column styleClass="tar">
    				<f:facet name="header">
    					<h:outputText value="#{messages.kadrons_msg}" />
    				</f:facet>
    				<h:outputText value="#{e.kadrons}" />
    			</rich:column>
    			<rich:column>
    				<f:facet name="header">
    					<h:outputText value="#{messages.email_msg}" />
    				</f:facet>
    				<h:commandLink action="#{kUserListManager.edit(e.id)}" value="#{e.user.email}" title="#{messages.edit_msg}" immediate="true" />
    			</rich:column>
    			<rich:column  width="5%" styleClass="tac">
    				<f:facet name="header">
    					<h:outputText value="#{messages.version_msg}" />
    				</f:facet>
    				<h:outputText value="#{e.user.version}" />
    			</rich:column>
    			<rich:column styleClass="tac">
    				<f:facet name="header">
    					<h:outputText value="#{messages.alarm_msg}" />
    				</f:facet>
    				<a:commandLink action="#{kUserListManager.alarm(e.user)}" reRender="ut_id, messages" >
    					<h:graphicImage value="#{!e.user.alarm ? '/img/star-empty.png' : '/img/star.png'}" title="#{!e.user.alarm ? messages.alarm_msg : messages.not_alarm_msg}" />
    				</a:commandLink>
    			</rich:column>
    			<rich:column styleClass="tac">
    				<f:facet name="header">
    					<h:outputText value="#{messages.do_msg}" />
    				</f:facet>
    				<a:commandLink action="#{kUserListManager.blockUnblock(e.user)}" reRender="ut_id, messages">
    					<h:graphicImage value="#{e.user.blocked ? '/img/tick.png' : '/img/cross.png'}" title="#{e.user.blocked ? messages.unblock_msg : messages.block_msg}"/>
    				</a:commandLink>
    			</rich:column>
    			<f:facet name="footer">
    				<rich:datascroller renderIfSinglePage="false" />
    			</f:facet>
    		</rich:dataTable>
    	</h:form>
    </ui:define>
</ui:composition>
